﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using Celf;

public class TopSceneManager : MonoBehaviour {

    public GameObject webview;
    public UnityEngine.UI.Text countDownText;

    int countDown = 10;

    // Use this for initialization
    void Start ()
    {
        //InvokeRepeating("Show", 1.0f, 1.0f);
        //WebViewService.Instance.Open("http://www.baidu.com");
    }

    void Show() {
        //countDown -= 1;
        //countDownText.text = "Show web view in " + countDown + "s";
        //if (countDown == 0) {
        //    webview.SetActive(true);
        //    CancelInvoke();
        //}
    }

    public void Open()
    {
        ////WebViewService.Instance.Open("http://www.baidu.com");  
        /// 
        //string url = UniWebViewHelper.streamingAssetURLForPath("UniWebViewDemo/callback.html");
        string url = "https://iu.qq.com/hbq/support/callback.html";
        //string url = "https://iu.qq.com/pao/dist/index.html#appid=100692648&openid=E367CC4E9BC33F4BB3B04A46AB353EEA&access_token=E79E40DF8DB75725A0901D9BC994298D&acctype=qq&areaid=2&platid=1&devtools=1"; 
        WebViewService.Instance.Open(url);


    }

    public void Close()
    {
        WebViewService.Instance.Close();
    }


}
